package com.jeecg.mvc.action;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.jeecg.mvc.base.MvcBaseAction;
import com.jeecg.mvc.base.MvcBaseForm;
import com.jeecg.mvc.formbean.LoginForm;

public class LoginAction extends MvcBaseAction {

	@Override
	public String execute(HttpServletRequest request, MvcBaseForm form,
			Map<String, String> forwardMap) {
		
		LoginForm loginForm=(LoginForm) form;
		if(loginForm.getName()==null||loginForm.getPassword()==null){
			return forwardMap.get("error");
		}
		if(loginForm.getName().equals("zhangbo")&&loginForm.getPassword().equals("123")){
			return forwardMap.get("success");
		}else{
			return forwardMap.get("error");
		}
	}
   
}
